import http from '../index';

// 创建活动
export const activityAddApi = (data) => http({
  url: '/wechat/activity/add',
  method: 'POST',
  data
})

// 活动列表
export const activityListApi = ({ currentPage, pageSize }) => http({
  url: "/wechat/activity/list",
  method: "GET",
  data: {
    currentPage,
    pageSize,
  },
})

// 活动详情
export const activityDetailApi = (id) => http({
  url: '/wechat/activity/detail',
  method: "GET",
  data: {
    id
  }
})

// 加入活动
export const activityJoinApi = ({ openid, activity_id }) => http({
  url: '/wechat/activity/join',
  method: 'GET',
  data: {
    openid,
    activity_id
  }
})

// 活动通知
export const activityJoinNotifyApi = (openid) => http({
  url: '/wechat/activity/activityjoinnotify',
  method: 'GET',
  data: {
    openid
  }
})